#include<bits/stdc++.h>
using namespace std;
const int N = 1e6+5;
int n,op[N];
bool vis[N];
double a[N],b[N],ans = 1e9;
double get(double nowx)
{
	double x,y,z,now,res;
	int lt = floor(nowx);
	for(int i = 1;i<=lt;i++)
	{
		x = nowx-i+1,y = a[op[i]],z = b[op[i]]/2;
		now = sqrt(x*x+y*y+z*z);
		y = b[op[i]],z = a[op[i]]/2;
		now = min(now,sqrt(x*x+y*y+z*z));
		res = max(res,now);
	}
	for(int i = lt+1;i<=n;i++)
	{
		x = i-nowx,y = a[op[i]],z = b[op[i]]/2;
		now = sqrt(x*x+y*y+z*z);
		y = b[op[i]],z = a[op[i]]/2;
		now = min(now,sqrt(x*x+y*y+z*z));
		res = max(res,now);
	}
	return res;
}
void solve()
{
	double l,r;
	int cs = 30;
	if(n==10) cs = 3;
	l = n*1.0/2-1,r = n*1.0/2+1;
	while(cs--)
	{
		double mid1 = (2.0*l+r)/3,mid2 = (l+2.0*r)/3,f1 = get(mid1),f2 = get(mid2);
		ans = min({ans,f1,f2});
		if(f1<=f2) r = mid2;
		else l = mid1;
	}
}
void dfs(int x)
{
	if(x>n) return solve();
	for(int i = 1;i<=n;i++)
		if(!vis[i])
			op[x] = i,vis[i] = 1,dfs(x+1),vis[i] = 0;
}
signed main()
{
	freopen("temple.in","r",stdin);
	freopen("temple.out","w",stdout);
	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	cin>>n;
	for(int i = 1;i<=n;i++)
		cin>>a[i]>>b[i];
	dfs(1);
	printf("%.10lf",ans);
	return 0;
}

